home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Now 11 / CD-ROM Now MegaDisc 11 (1995-02).iso / discs / toolkit / part1.txt < prev    next >
Internet Message Format  |  1994-11-01  |  50KB

  1. Path: bloom-beacon.mit.edu!hookup!swrinde!pipex!lyra.csx.cam.ac.uk!iwj10
  2. From: ijackson@nyx.cs.du.edu (Ian Jackson)
  3. Newsgroups: comp.os.linux.announce,comp.os.linux.help,comp.answers,news.answers
  4. Subject: Linux Frequently Asked Questions with Answers (FAQ: 1/2)
  5. Supersedes: <ijackson-linux-faq2-8-1994@nyx.cs.du.edu>
  6. Followup-To: poster
  7. Date: Sun, 30 Oct 1994 16:24:24 GMT
  8. Organization: Linux Unlimited
  9. Lines: 1092
  10. Approved: *.answers moderation team <news-answers-request@mit.edu>,
  11.           Matt Welsh <linux-announce-request@tc.cornell.edu>
  12. Expires: Sun, 4 Dec 1994 16:24:24 GMT
  13. Message-ID: <ijackson-linux-faq2-9-1994@nyx.cs.du.edu>
  14. NNTP-Posting-Host: bootes.cus.cam.ac.uk
  15. Summary: Please read the whole FAQ before posting to comp.os.linux.help.
  16. Keywords: FAQ, Linux, part1
  17. Originator: iwj10@bootes.cus.cam.ac.uk
  18. Xref: bloom-beacon.mit.edu comp.os.linux.announce:2977 comp.os.linux.help:67690 comp.answers:8039 news.answers:28343
  19.  
  20. Archive-Name: linux/faq/part1
  21. Last-Modified: 30 Oct 1994
  22.  
  23. -----BEGIN PGP SIGNED MESSAGE-----
  24.  
  25. This is the list of Frequently Asked Questions about Linux, the free Unix
  26. for 386/486/586 [see Q1.1 `What is Linux ?' for more details].  It should
  27. be read in conjunction with the HOWTO documents, which are available in
  28.  
  29. * ftp.funet.fi (128.214.6.100) : /pub/OS/Linux/doc/HOWTO
  30. * tsx-11.mit.edu (18.172.1.2) : /pub/linux/docs/HOWTO
  31. * sunsite.unc.edu (152.2.22.81) : /pub/Linux/docs/HOWTO
  32.  
  33. and mirror sites thereof -- see Q2.5 `Where can I get Linux material by
  34. FTP ?'.  See Q2.1 `Where can I get the HOWTOs and other documentation ?'
  35. for a list of the HOWTOs and more information.  The INFO-SHEET and
  36. META-FAQ, found in the same place, also list other sources of Linux
  37. information.
  38.  
  39. The Linux Documentation Project documentation is available on
  40. sunsite.unc.edu in /pub/Linux/docs/LDP.  These documents (more are in
  41. preparation) are invaluable to the newcomer or for use as a reference
  42. work.
  43.  
  44. Please check out these documents and this FAQ, especially Q12.1 `You still
  45. haven't answered my question !', before posting your question to the
  46. newsgroup comp.os.linux.help.
  47.  
  48. See Q13.2 `Formats in which this FAQ is available' for details of where to
  49. get the PostScript, Emacs Info, HTML (WWW) and plain ASCII versions of
  50. this document.
  51.  
  52. You can skip to a particular question by searching for `Question n.n'.
  53.  
  54. Note that this posting has been split into two parts because of its size.
  55.  
  56. A new version of this document appears approximately monthly.  If this
  57. copy is more than a month old it may be out of date.
  58.  
  59. ===============================================================================
  60.  
  61. Index
  62.  
  63.  Section 1.  Introduction and General Information
  64.  Q1.1        What is Linux ?
  65.  Q1.2        What software does it support ?
  66.  Q1.3        Does it run on my computer ?  What hardware is supported ?
  67.  Q1.4        What ports to other processors are there ?
  68.  Q1.5        How much hard disk space does Linux need ?
  69.  Q1.6        Is Linux PD ?  Copyrighted ?
  70.  
  71.  Section 2.  Network sources and resources
  72.  Q2.1        Where can I get the HOWTOs and other documentation ?
  73.  Q2.2        Where should I look on the World Wide Web for Linux stuff ?
  74.  Q2.3        What newsgroups are there for Linux ?
  75.  Q2.4        How do I install Linux ?
  76.  Q2.5        Where can I get Linux material by FTP ?
  77.  Q2.6        I don't have FTP access.  Where do I get Linux ?
  78.  Q2.7        I don't have Usenet access.  Where do I get information ?
  79.  Q2.8        What's this mailing list thing at niksula.hut.fi ?
  80.  Q2.9        Are the newsgroups archived anywhere ?
  81.  
  82.  Section 3.  Compatibility with other operating systems
  83.  Q3.1        Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?
  84.  Q3.2        How do I access files on my DOS partition or floppy ?
  85.  Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
  86.  Q3.4        Can I access OS/2 HPFS partitions from Linux ?
  87.  Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
  88.  Q3.6        Can I run Microsoft Windows programs under Linux ?
  89.  Q3.7        How can I boot Linux from OS/2's Boot Manager ?
  90.  Q3.8        How can I share a swap partition between Linux and MS Windows ?
  91.  
  92.  Section 4.  Linux's handling of filesystems, disks and drives
  93.  Q4.1        How can I undelete files ?
  94.  Q4.2        Is there a defragmenter for ext2fs etc. ?
  95.  Q4.3        How do I format and create a filesystem on a floppy ?
  96.  Q4.4        I get nasty messages about inodes, blocks, and the suchlike
  97.  Q4.5        My swap area isn't working.
  98.  Q4.6        How do I remove LILO so my system boots DOS again ?
  99.  Q4.7        Why can't I use fdformat except as root ?
  100.  Q4.8        Is there something like Stacker or Doublespace for Linux ?
  101.  Q4.9        My ext2fs partitions are checked each time I reboot.
  102.  Q4.10       I have a huge /proc/kcore !  Can I delete it ?
  103.  Q4.11       My AHA1542C doesn't work with Linux.
  104.  
  105.  Section 5.  Porting, compiling and obtaining programs
  106.  Q5.1        What is ld.so and where do I get it ?
  107.  Q5.2        Has anyone ported / compiled / written XXX for Linux ?
  108.  Q5.3        How do I port XXX to Linux ?
  109.  Q5.4        Can I use code or a compiler compiled for a 486 on my 386 ?
  110.  Q5.5        What does gcc -O6 do ?
  111.  Q5.6        Where are <linux/*.h> and <asm/*.h> ?
  112.  Q5.7        I get errors when I try to compile the kernel.
  113.  Q5.8        How do I make a shared library ?
  114.  Q5.9        How do I make my executables smaller ?
  115.  
  116.  Section 6.  Solutions to common miscellaneous problems
  117.  Q6.1        Setuid scripts don't seem to work.
  118.  Q6.2        Free memory as reported by free keeps shrinking.
  119.  Q6.3        When I add more memory it slows to a crawl.
  120.  Q6.4        Some programs (e.g. xdm) won't let me log in.
  121.  Q6.5        Some programs let me log in with no password.
  122.  Q6.6        My machine runs very slowly when I run GCC / X / ...
  123.  Q6.7        I can only log in as root.
  124.  Q6.8        My screen is all full of weird characters instead of letters.
  125.  Q6.9        I have screwed up my system and can't log in to fix it.
  126.  Q6.10       Emacs just dumps core.
  127.  Q6.11       I've discovered a huge security hole in rm !
  128.  Q6.12       lpr and/or lpd aren't working.
  129.  
  130.  Section 7.  How do I do this or find out that ... ?
  131.  Q7.1        How can I get scrollback in text mode ?
  132.  Q7.2        How do I switch virtual consoles ?  How do I enable them ?
  133.  Q7.3        How do I set the timezone ?
  134.  Q7.4        What version of Linux and what machine name am I using ?
  135.  Q7.5        How can I enable or disable core dumps ?
  136.  Q7.6        How do I upgrade/recompile my kernel ?
  137.  Q7.7        Can I have more than 3 serial ports by sharing interrupts ?
  138.  Q7.8        How do I make a bootable floppy ?
  139.  Q7.9        How do I remap my keyboard to UK, French, etc. ?
  140.  Q7.10       How do I get NUM LOCK to default to on ?
  141.  
  142.  Section 8.  Miscellaneous information and questions answered
  143.  Q8.1        What is a .gz file ? And a .tgz ? And ... ?
  144.  Q8.2        What does VFS stand for ?
  145.  Q8.3        What is a BogoMip ?
  146.  Q8.4        What is the Linux Journal and where can I get it ?
  147.  Q8.5        How many people use Linux ?
  148.  Q8.6        How should I pronounce Linux ?
  149.  
  150.  Section 9.  Frequently encountered error messages
  151.  Q9.1        During linking I get Undefined symbol _mcount
  152.  Q9.2        lp1 on fire
  153.  Q9.3        INET: Warning: old style ioctl(IP_SET_DEV) called!
  154.  Q9.4        ld: unrecognized option '-m486'
  155.  Q9.5        GCC says Internal compiler error
  156.  Q9.6        make says Error 139
  157.  Q9.7        shell-init: permission denied when I log in.
  158.  Q9.8        No utmp entry.  You must exec ... when I log in.
  159.  Q9.9        Warning - bdflush not running
  160.  Q9.10       Warning: obsolete routing request made.
  161.  Q9.11       EXT2-fs: warning: mounting unchecked filesystem
  162.  Q9.12       EXT2-fs warning: maximal count reached
  163.  Q9.13       EXT2-fs warning: checktime reached
  164.  Q9.14       df says Cannot read table of mounted filesystems
  165.  Q9.15       fdisk says Partition X has different physical/logical ...
  166.  Q9.16       fdisk: Partition 1 does not start on cylinder boundary
  167.  Q9.17       fdisk says cannot use nnn sectors of this partition
  168.  Q9.18       fdisk says partition n has an odd number of sectors
  169.  Q9.19       mtools says cannot initialise drive XYZ
  170.  
  171.  Section 10. The X Window System
  172.  Q10.1       Does Linux support X Windows ?
  173.  Q10.2       Where can I get an Xconfig for my video card and monitor ?
  174.  Q10.3       xterm logins show up strangely in who, finger
  175.  Q10.4       I can't get X Windows to work right.
  176.  
  177.  Section 11. Questions applicable to very out-of-date software
  178.  Q11.1       How can I have more than 16Mb of swap ?
  179.  Q11.2       GCC sometimes uses huge amounts of virtual memory and thrashes
  180.  Q11.3       My keyboard goes all funny after I switch VC's.
  181.  
  182.  Section 12. How to get further assistance
  183.  Q12.1       You still haven't answered my question !
  184.  Q12.2       What to put in a posting to comp.os.linux.help
  185.  
  186.  Section 13. Administrative information and acknowledgements
  187.  Q13.1       Feedback is invited
  188.  Q13.2       Formats in which this FAQ is available
  189.  Q13.3       Authorship and acknowledgements
  190.  Q13.4       Disclaimer and Copyright
  191.  
  192. ===============================================================================
  193.  
  194. Section 1.  Introduction and General Information
  195.  
  196.  Q1.1        What is Linux ?
  197.  Q1.2        What software does it support ?
  198.  Q1.3        Does it run on my computer ?  What hardware is supported ?
  199.  Q1.4        What ports to other processors are there ?
  200.  Q1.5        How much hard disk space does Linux need ?
  201.  Q1.6        Is Linux PD ?  Copyrighted ?
  202.  
  203. - -----------------------------------------------------------------------------
  204.  
  205. Question 1.1.  What is Linux ?
  206.  
  207. Linux is a Unix clone written from scratch by Linus Torvalds with
  208. assistance from a loosely-knit team of hackers across the Net.  It aims
  209. towards POSIX compliance.
  210.  
  211. It has all the features you would expect in a modern fully-fledged Unix,
  212. including true multitasking, virtual memory, shared libraries, demand
  213. loading, shared copy-on-write executables, proper memory management and
  214. TCP/IP networking.
  215.  
  216. It runs mainly on 386/486/586-based PCs, using the hardware facilities of
  217. the 386 processor family (TSS segments et al) to implement these features.
  218. Ports to other architectures are underway [Q1.4 `What ports to other
  219. processors are there ?'].
  220.  
  221. See the Linux INFO-SHEET [Q2.1 `Where can I get the HOWTOs and other
  222. documentation ?'] for more details.
  223.  
  224. The Linux kernel is distributed under the GNU General Public License - see
  225. Q1.6 `Is Linux PD ?  Copyrighted ?' for more details.
  226.  
  227. - -----------------------------------------------------------------------------
  228.  
  229. Question 1.2.  What software does it support ?
  230.  
  231. Linux has GCC, Emacs, X-Windows, all the standard Unix utilities, TCP/IP
  232. (including SLIP and PPP) and all the hundreds of programs that people have
  233. compiled or ported for it.
  234.  
  235. There is a DOS emulator [Q3.1 `Can Linux coexist with DOS ?  OS/2 ?
  236. 386BSD ?  Minix ?'].  Work is progressing on an iBCS2 (Intel Binary
  237. Compatibility Standard) emulator for SVR4 ELF and SVR3.2 COFF binaries and
  238. an emulator for Microsoft Windows binaries [Q3.6 `Can I run Microsoft
  239. Windows programs under Linux ?'].
  240.  
  241. For more information see the INFO-SHEET, which is one of the the HOWTOs
  242. [Q2.1 `Where can I get the HOWTOs and other documentation ?'].  See also
  243. Q5.3 `How do I port XXX to Linux ?'.
  244.  
  245. Some companies have commercial software available, including Motif.  They
  246. announce their availability in comp.os.linux.announce --- try searching
  247. the archives [Q2.9 `Are the newsgroups archived anywhere ?'].
  248.  
  249. - -----------------------------------------------------------------------------
  250.  
  251. Question 1.3.  Does it run on my computer ?  What hardware is supported ?
  252.  
  253. You need a 386, 486 or 586, with at least 2Mb of RAM and a single floppy,
  254. to try it out.  To do anything useful more RAM and a hard disk are
  255. required.
  256.  
  257. VESA local bus and PCI are both supported.  A driver for the NCR SCSI chip
  258. in many PCI machines is included in current alpha test release kernels.
  259.  
  260. There are problems with machines using MCA (IBM's proprietary bus), mainly
  261. to do with the hard disk controller.  There is a developers' release for
  262. PS/2 ESDI drives on invaders.dcrl.nd.edu in /pub/misc/linux.  Certain
  263. kinds of SCSI controllers also work, I understand.  Work is in progress to
  264. create a suitable version of the Slackware distribution.  I'm afraid I
  265. don't have any further details; you could try asking Arindam Banerji
  266. <axb@defender.dcrl.nd.edu>.
  267.  
  268. Linux is reported to run on 386 family based laptops, with X on most of
  269. them.
  270.  
  271. For details of exactly which PC's, video cards, disk controllers, etc.
  272. work see the INFO-SHEET and the Hardware HOWTO [Q2.1 `Where can I get the
  273. HOWTOs and other documentation ?'].
  274.  
  275. Linux will never run on a 286, because it uses task-switching and memory
  276. management facilities only found on 386 family processors.
  277.  
  278. - -----------------------------------------------------------------------------
  279.  
  280. Question 1.4.  What ports to other processors are there ?
  281.  
  282. A project has been underway for around two years to port Linux to suitable
  283. 68000-series based systems such as Amigas and Ataris.  This has now
  284. reached beta test quality, but still lacks networking support and an X
  285. server.  There is a 680X0 channel on the Linux Activists mailserver [Q2.8
  286. `What's this mailing list thing at niksula.hut.fi ?'].
  287.  
  288. Work has just been started on a port to the PowerPC.  Currently this will
  289. be based on the PowerMAC architecture.  Again, don't post asking about it
  290. unless you have experience to offer, and don't hold your breath.
  291.  
  292. Jim Paradis <paradis@sousa.amt.ako.dec.com> or <jrp@world.std.com> is
  293. working on a port to the 64-bit DEC AXP (the Alpha).  This can currently
  294. boot from a floppy disk or disk image loaded into a ramdisk at boot time.
  295. Disk drivers are not yet available.  Please email him of you have access
  296. to an ISA or EISA-based Alpha AXP and wish to contribute to the project,
  297. or have access to another class of Alpha and are willing to write drivers.
  298.  
  299. Ralf Baechle is working on a port to the MIPS, initially for the R4600 on
  300. Deskstation Tyne machines.  The Linux/MIPS FAQ is available on the WWW and
  301. in the MIPS port area on ftp.waldorf-gmbh.de in /pub/linux/mips.  There is
  302. also a MIPS channel on the Linux Activists mailserver.  Interested people
  303. may mail their questions and offers of assistance to
  304. <linux@waldorf-gmbh.de>.
  305.  
  306. None of these ports will be capable of running Linux/386 binaries.
  307.  
  308. - -----------------------------------------------------------------------------
  309.  
  310. Question 1.5.  How much hard disk space does Linux need ?
  311.  
  312. 10Mb for a very minimal installation, suitable for trying it out and not
  313. much else.
  314.  
  315. You can squeeze a more complete installation including X Windows into
  316. 80Mb.  Installating the whole of Slackware 1.2 takes around 200Mb,
  317. including some space for user files and spool areas.
  318.  
  319. - -----------------------------------------------------------------------------
  320.  
  321. Question 1.6.  Is Linux PD ?  Copyrighted ?
  322.  
  323. The Linux kernel copyright belongs to Linus Torvalds.  He has placed it
  324. under the GNU General Public Licence, which basically means that you may
  325. freely copy, change and distribute it, but that you may not impose any
  326. restrictions on further distribution, and that you must make the source
  327. code available.
  328.  
  329. Full details are in the file COPYING in the Linux kernel sources (probably
  330. in /usr/src/linux on your system).
  331.  
  332. The licences of the utilities and programs which come with the
  333. installations vary; much of the code is from the GNU Project at the Free
  334. Software Foundation, and is also under the GPL.
  335.  
  336. Note that discussion about the merits or otherwise of the GPL should be
  337. posted to gnu.misc.discuss and not to the comp.os.linux groups.
  338.  
  339. ===============================================================================
  340.  
  341. Section 2.  Network sources and resources
  342.  
  343.  Q2.1        Where can I get the HOWTOs and other documentation ?
  344.  Q2.2        Where should I look on the World Wide Web for Linux stuff ?
  345.  Q2.3        What newsgroups are there for Linux ?
  346.  Q2.4        How do I install Linux ?
  347.  Q2.5        Where can I get Linux material by FTP ?
  348.  Q2.6        I don't have FTP access.  Where do I get Linux ?
  349.  Q2.7        I don't have Usenet access.  Where do I get information ?
  350.  Q2.8        What's this mailing list thing at niksula.hut.fi ?
  351.  Q2.9        Are the newsgroups archived anywhere ?
  352.  
  353. - -----------------------------------------------------------------------------
  354.  
  355. Question 2.1.  Where can I get the HOWTOs and other documentation ?
  356.  
  357. Look in the following places, and on sites that mirror them.
  358.  
  359. * ftp.funet.fi (128.214.6.100) : /pub/OS/Linux/doc/HOWTO
  360. * tsx-11.mit.edu (18.172.1.2) : /pub/linux/docs/HOWTO
  361. * sunsite.unc.edu (152.2.22.81) : /pub/Linux/docs/HOWTO
  362.  
  363. For a complete list of Linux FTP sites see Q2.5 `Where can I get Linux
  364. material by FTP ?'.
  365.  
  366. If you don't have access to FTP try using the FTP-by-mail servers at
  367. ftpmail@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
  368. ftp-mailer@informatik.tu-muenchen.de.
  369.  
  370. A complete list of HOWTO's is available in the file HOWTO.INDEX in the
  371. docs/HOWTO directory at the FTP sites, but here is a (possibly incomplete)
  372. list:
  373.  
  374.      Linux INFO-SHEET                        Linux META-FAQ
  375.      BUPS HOWTO (regarding the Back UPS).    Busmouse HOWTO
  376.      CDROM HOWTO                             Distribution HOWTO
  377.      DOSEMU HOWTO                            Ethernet HOWTO
  378.      Ftape HOWTO                             Hardware HOWTO
  379.      Installation HOWTO                      Japanese Extensions HOWTO
  380.      Keystroke HOWTO                         Mail HOWTO
  381.      MGR HOWTO                               NET-2 HOWTO
  382.      News HOWTO                              Printing HOWTO
  383.      SCSI HOWTO                              Sound HOWTO
  384.      Term HOWTO                              Tips HOWTO
  385.      UUCP HOWTO                              XFree86 HOWTO
  386. More of these documents are always in preparation.  You should check in
  387. nearby directories on the FTP sites if you can't find the answer in one of
  388. the HOWTOs.  There are also a few mini-HOWTOs on sunsite.unc.edu in the
  389. /pub/Linux/docs/HOWTO/mini directory.
  390.  
  391. The HOWTO.INDEX also contains information on how to write a new HOWTO.
  392.  
  393. The HOWTOs are coordinated by Matt Welsh, <mdw@sunsite.unc.edu>.
  394.  
  395. The `books' produced by the Linux Documentation Project are available in
  396. /pub/Linux/docs/LDP on sunsite.unc.edu.  Please read them if you are new
  397. to Unix and Linux.  Here is a list of those released so far:
  398.  
  399. * The Linux Documentation Project manifesto
  400. * Installation and Getting Started Guide
  401. * The Kernel Hacker's Guide
  402. * Network Administration Guide
  403. * Linux System Administrator's Guide
  404.  
  405. - -----------------------------------------------------------------------------
  406.  
  407. Question 2.2.  Where should I look on the World Wide Web for Linux stuff ?
  408.  
  409. Matt Welsh maintains the Linux Documentation Project Home Page, at
  410. http://sunsite.unc.edu/mdw/linux.html.
  411.  
  412. This page refers to all the FAQs and HOWTOs, both those which are
  413. available in HTML (WWW) format, like this FAQ, and those which aren't.
  414.  
  415. - -----------------------------------------------------------------------------
  416.  
  417. Question 2.3.  What newsgroups are there for Linux ?
  418.  
  419. There are five international Usenet newsgroups devoted to Linux.
  420.  
  421. comp.os.linux.announce is the moderated announcements group; you should
  422. read this if you intend to use Linux.  Submissions for that group should
  423. be emailed to linux-announce@tc.cornell.edu.
  424.  
  425. comp.os.linux.help, comp.os.linux.development, comp.os.linux.admin and
  426. comp.os.linux.misc are also worth reading -- you may find that many common
  427. problems are too recent to find in this FAQ but are answered in the
  428. newsgroups.
  429.  
  430. Remember that since Linux is a Unix clone, most all of the material in
  431. comp.unix.* and comp.windows.x.* groups will be relevant.  Apart from
  432. hardware considerations, and some obscure or very technical low-level
  433. issues, you'll find that these groups are the right place to start.
  434.  
  435. Please read Q12.1 `You still haven't answered my question !' before
  436. posting, and make sure you post to the right newsgroup.  Crossposting is
  437. rarely a good idea.
  438.  
  439. See also Q2.7 `I don't have Usenet access.  Where do I get information ?'.
  440.  
  441. Other regional and local newsgroups also exist - you may find the traffic
  442. more manageable there.  The French Linux newsgroup is fr.comp.os.linux;
  443. The German one is de.comp.os.linux.  In Australia, try
  444. aus.computers.linux.
  445.  
  446. There may well be Linux groups local to your institution or area - check
  447. there first.
  448.  
  449. - -----------------------------------------------------------------------------
  450.  
  451. Question 2.4.  How do I install Linux ?
  452.  
  453. There are several pre-packaged releases of Linux available, including the
  454. MCC-Interim release, the TAMU release and the Slackware release.  Each
  455. contains the software you need to run Linux, ready to install and use.
  456. The exact details of which software is included and how to install them
  457. vary from release to release.
  458.  
  459. You should read the Installation HOWTO for more details on how to go about
  460. installing Slackware.  If you prefer a small, clean distribution to one
  461. with everything but the kitchen sink you might like to try the MCC-Interim
  462. release.
  463.  
  464. All of those releases are available via anonymous FTP from the Linux
  465. archive sites [Q2.5 `Where can I get Linux material by FTP ?'].  There are
  466. also a large number of other releases which are distributed less globally,
  467. which suit special local and national requirements (for example, better
  468. internationalisation support).
  469.  
  470. - -----------------------------------------------------------------------------
  471.  
  472. Question 2.5.  Where can I get Linux material by FTP ?
  473.  
  474. There are three main archive sites for Linux:
  475.  
  476. * ftp.funet.fi (Finland, 128.214.6.100) : /pub/OS/Linux
  477. * sunsite.unc.edu (US, 152.2.22.81) : /pub/Linux
  478. * tsx-11.mit.edu (US, 18.172.1.2) : /pub/linux
  479.  
  480. The MCC-Interim release is available from ftp.mcc.ac.uk (US, 130.88.200.7)
  481. in /pub/linux; the TAMU release is available from net.tamu.edu (US,
  482. 128.194.177.1) in /pub/linux.
  483.  
  484. The contents of these sites is mirrored (copied, usually approximately
  485. daily) by a number of other sites.  Please use one close to you -- that
  486. will be faster for you and easier on the network.
  487.  
  488. * src.doc.ic.ac.uk : /packages/Linux (UK)
  489. * sunacm.swan.ac.uk : /pub/Linux (UK)
  490. * ftp.ibp.fr : /pub/linux (France)
  491. * wuarchive.wustl.edu : /systems/linux (US)
  492. * mrcnext.cso.uiuc.edu : /pub/linux (US)
  493. * ftp.informatik.tu-muenchen.de : /pub/comp/os/linux (Germany)
  494. * ftp.ibr.cs.tu-bs.de : /pub/os/linux (Germany)
  495. * ftp.dfv.rwth-aachen.de : /pub/linux (Germany)
  496. * ftp.informatik.rwth-aachen.de : /pub/Linux (Germany)
  497. * bond.edu.au : /pub/OS/Linux (Australia)
  498. * monu1.cc.monash.edu.au : /pub/linux (Australia)
  499. * ftp.sun.ac.za : /pub/linux (South Africa)
  500.  
  501. Not all of these mirror all of the other `source' sites, and some have
  502. material not available on the `source' sites.
  503.  
  504. - -----------------------------------------------------------------------------
  505.  
  506. Question 2.6.  I don't have FTP access.  Where do I get Linux ?
  507.  
  508. The easiest thing is probably to find a friend with FTP access.  If there
  509. is a Linux users group near you they may be able to help.
  510.  
  511. If you have a reasonably good email connection you could try the
  512. FTP-by-mail servers at ftpmail@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
  513. ftp-mailer@informatik.tu-muenchen.de.
  514.  
  515. Linux is also available via traditional mail on diskette, CD-ROM and tape.
  516. The Installation HOWTO, and the file /pub/Linux/docs/distributions on
  517. sunsite.unc.edu, contain information on these distributions.
  518.  
  519. You could also try Zane Healy <healyzh@holonet.net>'s list of Linux BBS's,
  520. which is posted regularly (1st and 15th of each month) to
  521. comp.os.linux.announce and occasionally to the Fidonet and RIME UNIX
  522. echoes.
  523.  
  524. - -----------------------------------------------------------------------------
  525.  
  526. Question 2.7.  I don't have Usenet access.  Where do I get information ?
  527.  
  528. Digests of postings to the comp.os.linux.* groups are available by
  529. subscribing to the bidirectional gateway at
  530. linux-*-request@news-digests.mit.edu, where * is one of announce,
  531. development, help, misc or admin.
  532.  
  533. You are strongly advised to subscribe to at least
  534. linux-announce-request@news-digests.mit.edu, as this carries important
  535. information and documentation about Linux.
  536.  
  537. Please remember to use the -request addresses for your subscription and
  538. unsubscription messages; mail to the other address is posted to the
  539. newsgroup !
  540.  
  541. - -----------------------------------------------------------------------------
  542.  
  543. Question 2.8.  What's this mailing list thing at niksula.hut.fi ?
  544.  
  545. It's a multi-channel mailing list, mainly used by the developers of Linux
  546. to talk about technical issues and future developments.  Most of the
  547. channels are not intended for new users to ask their questions on.
  548.  
  549. The ANNOUNCE channel is a digest of postings to comp.os.linux.announce,
  550. for the benefit of those without Usenet access.  However since
  551. niksula.hut.fi is slow and overloaded I'd recommend subscribing to the MIT
  552. digestifier instead [Q2.7 `I don't have Usenet access.  Where do I get
  553. information ?'].
  554.  
  555. There is also a NEWBIE channel where `no question is too stupid';
  556. unfortunately it seems that few of the experienced users read that
  557. channel, probably because of all the `stupid' questions !
  558.  
  559. If you want to subscribe to one or more of the channels at the
  560. multi-channel list, send an empty mail message to
  561. linux-activists-request@niksula.hut.fi and you'll receive the instructions
  562. for operating the list subscription software.
  563.  
  564. If you want to unsubscribe send a mail message like this
  565.   From: you@domain.org
  566.   To: linux-activists-request@niksula.hut.fi
  567.   Subject: irrelevant
  568.  
  569.   X-Mn-Admin: leave CHANNEL
  570. to leave a channel called CHANNEL.  Do *not* put an X-Mn-Key line in your
  571. message - that will cause it to be posted to the list.
  572.  
  573. Note that you *must* remember to unsubscribe *before* you change your
  574. email address, as due to a design flaw in the list server it is virtually
  575. impossible to get yourself unsubscribed after such a change.
  576.  
  577. - -----------------------------------------------------------------------------
  578.  
  579. Question 2.9.  Are the newsgroups archived anywhere ?
  580.  
  581. Yes.  ftp.funet.fi and tsx-11.mit.edu contain archives of both
  582. comp.os.linux.announce and the old group comp.os.linux, in their Linux
  583. areas.  The comp.os.linux.announce archives are mirrored from /usenet on
  584. src.doc.ic.ac.uk (which also contains another archive of comp.os.linux).
  585.  
  586. ===============================================================================
  587.  
  588. Section 3.  Compatibility with other operating systems
  589.  
  590.  Q3.1        Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?
  591.  Q3.2        How do I access files on my DOS partition or floppy ?
  592.  Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
  593.  Q3.4        Can I access OS/2 HPFS partitions from Linux ?
  594.  Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
  595.  Q3.6        Can I run Microsoft Windows programs under Linux ?
  596.  Q3.7        How can I boot Linux from OS/2's Boot Manager ?
  597.  Q3.8        How can I share a swap partition between Linux and MS Windows ?
  598.  
  599. - -----------------------------------------------------------------------------
  600.  
  601. Question 3.1.  Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?
  602.  
  603. Yes.  Linux uses the standard PC partitioning scheme, so it can share your
  604. disk with other operating systems.
  605.  
  606. Linux can read and write the files on your DOS and OS/2 FAT partitions and
  607. floppies using either the DOS filesystem type built into the kernel or
  608. mtools.  There is a DOS emulator (look on tsx-11.mit.edu in
  609. /pub/linux/ALPHA/dosemu) which can run DOS itself and some (but not all)
  610. DOS applications.
  611.  
  612. Linux can also access Minix and System V UFS filesystems, and can read
  613. (but not yet write) OS/2 HPFS and Amiga filesystems.
  614.  
  615. - -----------------------------------------------------------------------------
  616.  
  617. Question 3.2.  How do I access files on my DOS partition or floppy ?
  618.  
  619. Use the DOS filesystem, i.e. type, for example:
  620.         mkdir /dos
  621.         mount -t msdos -o conv=text,umask=022,uid=100,gid=100 /dev/hda3 /dos
  622. If it's a floppy, don't forget to umount it before ejecting it !
  623.  
  624. You can use the conv=text/binary/auto, umask=nnn, uid=nnn and gid=nnn
  625. options to control the automatic line-ending conversion, permissions and
  626. ownerships of the files in the DOS filesystem as they appear under Linux.
  627. If you mount your DOS filesystem by putting it in your /etc/fstab you can
  628. record the options (comma-separated) there, instead of defaults.
  629.  
  630. Alternatively you can use `mtools', available in both binary and source
  631. form on the FTP sites -- see Q2.5 `Where can I get Linux material by FTP
  632. ?'.
  633.  
  634. A kernel patch (known as the fd-patches) is available which allows
  635. floppies with nonstandard numbers of tracks and/or sectors to be used;
  636. this patch is included in the 1.1 alpha testing kernel series.
  637.  
  638. - -----------------------------------------------------------------------------
  639.  
  640. Question 3.3.  Can I use my Stacked/DBLSPC/etc. DOS drive ?
  641.  
  642. Not easily.  You can access them from within the DOS emulator [Q3.1 `Can
  643. Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?'], but not as a normal
  644. filesystem under Linux or using mtools.
  645.  
  646. - -----------------------------------------------------------------------------
  647.  
  648. Question 3.4.  Can I access OS/2 HPFS partitions from Linux ?
  649.  
  650. Yes, but it's only read-only at the moment.  To use it you must compile a
  651. kernel with support for it enabled [Q7.6 `How do I upgrade/recompile my
  652. kernel ?'].  Then you can mount it using the mount command, for example:
  653.         mkdir /hpfs
  654.         mount -t hpfs /dev/hda5 /hpfs
  655.  
  656. - -----------------------------------------------------------------------------
  657.  
  658. Question 3.5.  Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
  659.  
  660. I'm told that there is an alpha test read-only Amiga filesystem on
  661. sunsite.unc.edu, probably in /pub/Linux/kernel/misc-patches/ffs-patch.
  662. Work may well be progressing on upgrading this to read-write for the 680x0
  663. Linux project.
  664.  
  665. The 1.1.x alpha test kernel series contains support for the UFS filesystem
  666. used by System V and Coherent.
  667.  
  668. There is no support for the rest of those yet; I have not heard of any
  669. recent work on providing some.
  670.  
  671. - -----------------------------------------------------------------------------
  672.  
  673. Question 3.6.  Can I run Microsoft Windows programs under Linux ?
  674.  
  675. Not yet.  There is a project, known as WINE, to build an MS Windows
  676. emulator for Linux, but it is not ready for users yet.  Don't ask about it
  677. unless you think you can contribute; look out for the status reports in
  678. comp.emulators.ms-windows.wine.
  679.  
  680. In the meantime if you need to run MS Windows programs your best bet is
  681. probably to reboot when you want to switch environments.  LILO (the Linux
  682. bootloader) has the facility for a boot menu --- see its documentation for
  683. more details.
  684.  
  685. - -----------------------------------------------------------------------------
  686.  
  687. Question 3.7.  How can I boot Linux from OS/2's Boot Manager ?
  688.  
  689. 1. Create a partition using OS/2's FDISK (Not Linux's fdisk).
  690.  
  691. 2. Format the partition under OS/2, either with FAT or HPFS.  This is so
  692. that OS/2 knows about the partition being formatted.
  693.  
  694. 3. Add the partition to the Boot Manager.
  695.  
  696. 4. Boot Linux, and create a filesystem on the partition using mkfs -t ext2
  697. or mke2fs.  At this point you may, if you like, use Linux's fdisk to
  698. change the partition type code of the new partition to type 83 (Linux
  699. Native) -- this may help some automated installation scripts find the
  700. right partition to use.
  701.  
  702. 5. Install Linux on the partition.
  703.  
  704. 6. Install LILO on the Linux partition -- NOT on the master boot record of
  705. the hard drive.  This installs LILO as a second-stage boot loader on the
  706. Linux partition itself, to start up the kernel specified in the LILO
  707. config file.  To do this you should put
  708.    boot = /dev/hda2
  709. (where /dev/hda2 is the *partition* you want to boot off) in your
  710. /etc/lilo/config or /etc/lilo.config file.
  711.  
  712. 7. Make sure that it is the Boot Manager partition that is marked active,
  713. so that you can use Boot Manager to choose what to boot.
  714.  
  715. - -----------------------------------------------------------------------------
  716.  
  717. Question 3.8.  How can I share a swap partition between Linux and MS Windows ?
  718.  
  719. See the Mini-HOWTO on the subject by H. Peter Anvin, <hpa@eecs.nwu.edu>.
  720. It is available on sunsite.unc.edu in /pub/Linux/docs.
  721.  
  722. ===============================================================================
  723.  
  724. Section 4.  Linux's handling of filesystems, disks and drives
  725.  
  726.  Q4.1        How can I undelete files ?
  727.  Q4.2        Is there a defragmenter for ext2fs etc. ?
  728.  Q4.3        How do I format and create a filesystem on a floppy ?
  729.  Q4.4        I get nasty messages about inodes, blocks, and the suchlike
  730.  Q4.5        My swap area isn't working.
  731.  Q4.6        How do I remove LILO so my system boots DOS again ?
  732.  Q4.7        Why can't I use fdformat except as root ?
  733.  Q4.8        Is there something like Stacker or Doublespace for Linux ?
  734.  Q4.9        My ext2fs partitions are checked each time I reboot.
  735.  Q4.10       I have a huge /proc/kcore !  Can I delete it ?
  736.  Q4.11       My AHA1542C doesn't work with Linux.
  737.  
  738. - -----------------------------------------------------------------------------
  739.  
  740. Question 4.1.  How can I undelete files ?
  741.  
  742. In general, this is very hard to do on Unices because of their
  743. multitasking nature.  Undelete functionality for the ext2fs is being
  744. worked on, but don't hold your breath.
  745.  
  746. There are a number of packages available that work by providing new
  747. commands for deletion and sometimes copying that move deleted files into a
  748. `wastebasket' directory instead; they can then be recovered until cleaned
  749. out automatically by background processing.
  750.  
  751. Alternatively you can search the raw disk device which holds the
  752. filesystem in question.  This is hard work, and you will need to be root
  753. to do this.
  754.  
  755. - -----------------------------------------------------------------------------
  756.  
  757. Question 4.2.  Is there a defragmenter for ext2fs etc. ?
  758.  
  759. Yes.  There is a Linux filesystem defragmenter for minix, old-style, ext2,
  760. and xia filesystems available on sunsite.unc.edu in
  761. system/Filesystems/defrag-0.6.tar.gz.
  762.  
  763. Users of the ext2 filesystem can probably do without defrag since ext2
  764. contains extra code to keep fragmentation reduced even in very full
  765. filesystems.
  766.  
  767. - -----------------------------------------------------------------------------
  768.  
  769. Question 4.3.  How do I format and create a filesystem on a floppy ?
  770.  
  771. For a 3.5 inch high density floppy:
  772.    fdformat /dev/fd0H1440
  773.    mkfs -t ext2 -m 0 /dev/fd0H1440 1440
  774. For a 5.25 inch floppy use fd0h1200 and 1200 as appropriate.  For the `B'
  775. drive use fd1 instead of fd0.  Full details of which floppy devices do
  776. what can be found in the Linux Device List [Q2.1 `Where can I get the
  777. HOWTOs and other documentation ?'].  If you don't have the fsutils package
  778. you'll have to run mke2fs instead of mkfs -t ext2.  The -m 0 option tells
  779. mkfs.ext2 not to reserve any space on the disk for the superuser ---
  780. usually the last 10% is reserved for root.
  781.  
  782. The first command low-level formats the floppy; the second creates an
  783. empty filesystem on it.  After doing this you can mount the floppy like a
  784. hard disk partition and simply cp and mv files, etc.
  785.  
  786. - -----------------------------------------------------------------------------
  787.  
  788. Question 4.4.  I get nasty messages about inodes, blocks, and the suchlike
  789.  
  790. You probably have a corrupted filesystem, probably caused by not shutting
  791. Linux down properly before turning off the power or resetting.  You need
  792. to use a recent shutdown program to do this --- for example, the one
  793. included in the util-linux package, available on sunsite and tsx-11.
  794.  
  795. If you're lucky the program fsck (or e2fsck or xfsck as appropriate if you
  796. don't have the fsutils package) will be able to repair your filesystem; if
  797. you're unlucky the filesystem is trashed and you'll have to reinitialise
  798. it with mkfs (or mke2fs, mkxfs etc.) it and restore from a backup.
  799.  
  800. NB don't try to check a filesystem that's mounted read-write - this
  801. includes the root partition if you don't see
  802.    VFS: mounted root ... read-only
  803. at boot time.
  804.  
  805. - -----------------------------------------------------------------------------
  806.  
  807. Question 4.5.  My swap area isn't working.
  808.  
  809. When you boot (or enable swapping manually) you should see
  810.         Adding Swap: NNNNk swap-space
  811.  
  812. If you don't see any messages at all you are probably missing swapon -av
  813. (the command to enable swapping) in your /etc/rc or /etc/rc.local (the
  814. system startup scripts), or have forgotten to make the right entry in
  815. /etc/fstab:
  816.         /dev/hda2       none       swap       sw
  817. for example.
  818.  
  819. If you see
  820.         Unable to find swap-space signature
  821. you have forgotten to run mkswap.  See the manpage for details; it works
  822. much like mkfs.
  823.  
  824. Check the Installation HOWTO for detailed instructions of how to set up a
  825. swap area.
  826.  
  827. - -----------------------------------------------------------------------------
  828.  
  829. Question 4.6.  How do I remove LILO so my system boots DOS again ?
  830.  
  831. Using DOS (MS-DOS 5.0 or later, or OS/2), type FDISK /MBR.  This will
  832. restore a standard MS-DOS Master Boot Record.  If you have DR-DOS 6.0, go
  833. into FDISK in the normal way and then select the `Re-write Master Boot
  834. Record' option.
  835.  
  836. If you don't have DOS 5 or DR-DOS you need to have the boot sector that
  837. LILO saved when you first installed it.  You did keep that file, didn't
  838. you ?  It's probably called boot.0301 or some such.  Type
  839.    dd if=boot.0301 of=/dev/hda bs=445 count=1
  840. (or sda if you're using a SCSI disk).  This may also wipe out your
  841. partition table, so beware !  If you're desperate, you could use
  842.    dd if=/dev/zero of=/dev/hda bs=512 count=1
  843. which will erase your partition table and boot sector completely: you can
  844. then reformat the disk using your favourite software; however this will
  845. render the contents of your disk inaccessible --- you'll lose it all
  846. unless you're an expert.
  847.  
  848. Note that the DOS MBR boots whichever (single!) partition is flagged as
  849. `active'; you may need to use fdisk to set and clear the active flags on
  850. partitions appropriately.
  851.  
  852. - -----------------------------------------------------------------------------
  853.  
  854. Question 4.7.  Why can't I use fdformat except as root ?
  855.  
  856. The system call to format a floppy may only be done as root, regardless of
  857. the permissions of /dev/fd0*.  If you want any user to be able to format a
  858. floppy try getting the fdformat2 program; this works around the problems
  859. by being setuid to root.
  860.  
  861. - -----------------------------------------------------------------------------
  862.  
  863. Question 4.8.  Is there something like Stacker or Doublespace for Linux ?
  864.  
  865. Currently none of the Linux filesystems can do compression in the
  866. filesystem.
  867.  
  868. There is a transparently uncompressing C library, which is a drop-in
  869. replacement for the standard C library.  It allows programs to read
  870. compressed (ie, GNU zipped) files as if they were not compressed.  You
  871. install it, and then you can compress files using gzip and have programs
  872. still find them.  Look on sunsite.unc.edu in /pub/Linux/libs.  The author
  873. is Alain Knaff <Alain.Knaff@imag.fr>.
  874.  
  875. There is a compressing block device driver that can provide
  876. filesystem-independant on the fly disk compression in the kernel.  It is
  877. called `DouBle'.  There is a source only distribution on sunsite.unc.edu
  878. in /pub/Linux/utils/compress; the auther is Jean-Marc Verbavatz
  879. <jmv@receptor.mgh.harvard.edu>.  Note that since this compresses inodes
  880. (administrative information) and directories as well as file contents any
  881. corruption is quite likely to be serious.
  882.  
  883. There is also a package available called tcx (Transparently Compressed
  884. Executables) which allows you to keep infrequently used executables
  885. compressed and only uncompress them temporarily while you use them.
  886. You'll find it on the Linux FTP sites [Q2.5 `Where can I get Linux
  887. material by FTP ?']; it was also announced in comp.os.linux.announce.
  888. Note - this is not the same as gzexe, which is an inferior implementation
  889. of the same concept.
  890.  
  891. - -----------------------------------------------------------------------------
  892.  
  893. Question 4.9.  My ext2fs partitions are checked each time I reboot.
  894.  
  895. See Q9.11 `EXT2-fs: warning: mounting unchecked filesystem'.
  896.  
  897. - -----------------------------------------------------------------------------
  898.  
  899. Question 4.10.  I have a huge /proc/kcore !  Can I delete it ?
  900.  
  901. None of the files in /proc are really there - they're all "pretend" files
  902. made up by the kernel, to give you information about the system, and don't
  903. take up any hard disk space.
  904.  
  905. /proc/kcore is like an "alias" for the memory in your computer; its size
  906. is the same as the amount of RAM you have, and if you ask to read it as a
  907. file the kernel does memory reads.
  908.  
  909. - -----------------------------------------------------------------------------
  910.  
  911. Question 4.11.  My AHA1542C doesn't work with Linux.
  912.  
  913. The option to allow disks with more than 1024 cylinders is only required
  914. as a workaround for a DOS misfeature and should be turned *off* under
  915. Linux.  For older Linux kernels you need to turn off most of the "advanced
  916. BIOS" options - all but the one about scanning the bus for bootable
  917. devices.
  918.  
  919. ===============================================================================
  920.  
  921. Section 5.  Porting, compiling and obtaining programs
  922.  
  923.  Q5.1        What is ld.so and where do I get it ?
  924.  Q5.2        Has anyone ported / compiled / written XXX for Linux ?
  925.  Q5.3        How do I port XXX to Linux ?
  926.  Q5.4        Can I use code or a compiler compiled for a 486 on my 386 ?
  927.  Q5.5        What does gcc -O6 do ?
  928.  Q5.6        Where are <linux/*.h> and <asm/*.h> ?
  929.  Q5.7        I get errors when I try to compile the kernel.
  930.  Q5.8        How do I make a shared library ?
  931.  Q5.9        How do I make my executables smaller ?
  932.  
  933. - -----------------------------------------------------------------------------
  934.  
  935. Question 5.1.  What is ld.so and where do I get it ?
  936.  
  937. ld.so is the new dynamic library loader.  Each binary using shared
  938. libraries used to have about 3K of start-up code to find and load the
  939. shared libraries.  Now that code has been put in a special shared library,
  940. /lib/ld.so, where all binaries can look for it, so that it wastes less
  941. disk space, and can be upgraded more easily.
  942.  
  943. It can be obtained from tsx-11.mit.edu in /pub/linux/packages/GCC and
  944. mirror sites thereof.  The latest version at the time of writing is
  945. ld.so.1.4.4.tar.gz.
  946.  
  947. - -----------------------------------------------------------------------------
  948.  
  949. Question 5.2.  Has anyone ported / compiled / written XXX for Linux ?
  950.  
  951. First, look in the Linux Software Map (LSM) --- it's in the docs directory
  952. on sunsite.unc.edu, and on the other FTP sties.
  953.  
  954. Check the FTP sites (see Q2.5 `Where can I get Linux material by FTP ?')
  955. first --- search the find-ls or INDEX files for appropriate strings.
  956. Check the Linux Projects Map (LPM), on ftp.ix.de in
  957. /pub/Linux/docs/Projects-Map.gz.
  958.  
  959. If you don't find anything, you could either download the sources to the
  960. program yourself and compile them -- see Q5.3 `How do I port XXX to Linux
  961. ?' -- or, if it's a large package which may require some porting, post a
  962. message to the newsgroup.
  963.  
  964. If you compile a largeish program please upload it to one or more of the
  965. FTP sites and post a message to comp.os.linux.announce (submit your
  966. posting to <linux-announce@tc.cornell.edu>).
  967.  
  968. If you're looking for an application-type program the chances are someone
  969. has already written a free verson.  Try reading the FAQ in
  970. comp.sources.wanted for instructions on how to find sources.
  971.  
  972. You should also check the Projects-FAQ, available in
  973. /pub/Linux/docs/faqs/Projects-FAQ on sunsite.unc.edu.
  974.  
  975. - -----------------------------------------------------------------------------
  976.  
  977. Question 5.3.  How do I port XXX to Linux ?
  978.  
  979. In general Unix programs need very little porting.  Simply follow the
  980. installation instructions.  If you don't know and don't know how to find
  981. out the answers to some of the questions asked during or by the
  982. installation procedure you can guess, but this tends to produce buggy
  983. programs.  In this case you're probably better off asking someone else to
  984. do the port.
  985.  
  986. If you have a BSD-ish program you should try using -I/usr/include/bsd and
  987. - -lbsd on the appropriate parts of the compilation lines.
  988.  
  989. - -----------------------------------------------------------------------------
  990.  
  991. Question 5.4.  Can I use code or a compiler compiled for a 486 on my 386 ?
  992.  
  993. Yes.
  994.  
  995. The -m486 option to GCC, which is used to compile binaries for 486
  996. machines, merely changes certain optimisations.  This makes for slightly
  997. larger binaries which run somewhat faster on a 486.  They still work fine
  998. on a 386, though, with little performance hit.
  999.  
  1000. GCC can be configured for a 386 or 486; the only difference is that
  1001. configuring it for a 386 makes -m386 the default and configuring for a 486
  1002. makes -m486 the default; in either case these can be overriden on a
  1003. per-compilation basis or by editing /usr/lib/gcc-lib/i*-linux/n.n.n/specs.
  1004.  
  1005. GCC does not currently know how to do optimisation well for the 586,
  1006. because Intel won't release the necessary information except under
  1007. nondisclosure.  Don't buy a Pentium or wait for people to reverse-engineer
  1008. the required optimisations.
  1009.  
  1010. - -----------------------------------------------------------------------------
  1011.  
  1012. Question 5.5.  What does gcc -O6 do ?
  1013.  
  1014. Currently the same as -O2; any number greater than 2 currently works just
  1015. like 2.  The Makefiles of newer kernels use -O2, and so should you.
  1016.  
  1017. GCC 2.6 adds optimisation level -O3.  However, GCC 2.6.0 and several of
  1018. the following versions are known to have some problems with Linux, though
  1019. these will hopefully be solved soon.  In any case you should not use -O3
  1020. on a program until you're sure it doesn't create any problems.
  1021.  
  1022. - -----------------------------------------------------------------------------
  1023.  
  1024. Question 5.6.  Where are <linux/*.h> and <asm/*.h> ?
  1025.  
  1026. These are in the directories /usr/include/linux and /usr/include/asm.
  1027.  
  1028. However they should be symbolic links to your kernel sources in
  1029. /usr/src/linux and not real directories.
  1030.  
  1031. If you don't have the kernel sources download them --- see Q7.6 `How do I
  1032. upgrade/recompile my kernel ?'.
  1033.  
  1034. Then use rm to remove any garbage, and ln to create the links:
  1035.    rm -rf /usr/include/linux /usr/include/asm
  1036.    ln -sf /usr/src/linux/include/linux /usr/include/linux
  1037.    ln -sf /usr/src/linux/include/asm /usr/include/asm
  1038.  
  1039. - -----------------------------------------------------------------------------
  1040.  
  1041. Question 5.7.  I get errors when I try to compile the kernel.
  1042.  
  1043. Make sure that /usr/include/linux and /usr/include/asm aren't actual
  1044. directories but instead symbolic links to /usr/src/linux/include/linux and
  1045. /usr/src/linux/include/asm respectively.
  1046.  
  1047. If necessary, delete them using rm and then use ln -s to make the links as
  1048. in Q5.6 `Where are <linux/*.h> and <asm/*.h> ?'.
  1049.  
  1050. Remember that when you apply a patch to the kernel you must use the -p0 or
  1051. - -p1 option: otherwise the patch may be misapplied.  See the manpage for
  1052. patch for details.
  1053.  
  1054. If you're using a kernel more recent than 1.1.44 you should find that
  1055. there are new directories /usr/src/linux/include/asm-i386.  The directory
  1056. asm there should be removed, as should the directory asm.  The symlinks
  1057. Makefile target will make these be symbolic links to asm-i36 and
  1058. arch/i386/boot respectively.  The easiest way to make sure all this gets
  1059. done is not to try to patch 1.1.44 to make 1.1.45, but to download
  1060. linux-1.1.45.tar.gz instead.
  1061.  
  1062. ld: unrecognised option `-qmagic' means you should get a newer linker,
  1063. from tsx-11.mit.edu in /pub/linux/packages/GCC.
  1064.  
  1065. - -----------------------------------------------------------------------------
  1066.  
  1067. Question 5.8.  How do I make a shared library ?
  1068.  
  1069. Get tools-n.nn.tar.gz from tsx-11.mit.edu, in /pub/linux/packages/GCC/src.
  1070. It comes with documentation that will tell you what to do.
  1071.  
  1072. - -----------------------------------------------------------------------------
  1073.  
  1074. Question 5.9.  How do I make my executables smaller ?
  1075.  
  1076. The most common cause of large executables is the -g compiler flag.  This
  1077. produces (as well as debugging information in the output file) a program
  1078. which is statically linked, i.e. one which includes a copy of the C
  1079. library instead of using a dynamically linked copy.
  1080.  
  1081. Other things that are worth investigating are -O and -O2 which enable
  1082. optimisation (check the GCC documentation) and -s which strips the symbol
  1083. information from the resulting binary (making debugging totally
  1084. impossible).
  1085.  
  1086. You may wish to use -N on very small executables (less than 8K with the
  1087. - -N), but you shouldn't do this unless you understand its performance
  1088. implications, and definitely never with daemons.
  1089.  
  1090. Using QMAGIC binaries also can reduce the size of binaries, especially
  1091. small ones.  Don't worry about this unless you know what QMAGIC is; Linux
  1092. is moving to QMAGIC as a default.
  1093.  
  1094. ===============================================================================
  1095.  
  1096. The remainder of the FAQ is in the next part ...
  1097.  
  1098.  
  1099. -----BEGIN PGP SIGNATURE-----
  1100. Version: 2.6
  1101.  
  1102. iQCVAgUBLrPJhMMWjroj9a3bAQHWjQP/TH4lgiCnzdpl/guA/aExxwyZk/yuYRBi
  1103. 6tZU8CNSnduoBucAR4MBhtsuXP6BuqxchkrQnvEJ+a+KTtK8dH6DV38Jlkln0Tk+
  1104. aOaFFOYPmdyu2TxU3TVPov5hDR/uTIfMwqyworscTrsIwVzSmaofDdcMP21gI7hZ
  1105. 2u+8mjjdT5I=
  1106. =Gtgy
  1107. -----END PGP SIGNATURE-----
  1108. -- 
  1109. Ian Jackson, at home.         ijackson@nyx.cs.du.edu or iwj10@cus.cam.ac.uk
  1110. +44 1223 575512    Escoerea on IRC.   http://www.cl.cam.ac.uk/users/iwj10/
  1111. 2 Lexington Close, Cambridge, CB4 3LS, England.   Urgent: iwj@cam-orl.co.uk
  1112.